package pl.edu.szlif.mosm.j2melib;

/**
 * A interface for classes concerned with providing map tiles.
 * 
 * @author Adam Morawski
 */

public interface OSMWidget {
	/**
	 * sets zoom level
	 * @param z
	 */
	void setZoom(int z);
	/**
	 * returns current zoom level
	 * @return
	 */
	int getZoom();
	/**
	 * returns max zoom level
	 * @return
	 */
	int maxZoom();
	/**
	 * scrolls by (x, y)*tileSize pixels if can
	 * @param x
	 * @param y
	 */
	void scrollBy(double x, double y);
	/**
	 * returns true if can scroll by params
	 * @param x
	 * @param y
	 * @return
	 */
	boolean canScrollBy(double x, double y);
	/**
	 * scrolls to OSM coordinates (at current zoom level)
	 * @param x
	 * @param y
	 */
	void scrollTo(double x, double y);
	/**
	 * @return x OSM coordinate
	 */
	double getX();
	/**
	 * @return y OSM coordinate
	 */
	double getY();
	/**
	 * @return max x OSM coordinate
	 */
	double maxX();
	/**
	 * @return max y OSM coordinate (at current zoom level)
	 */
	double maxY();
	/**
	 * scrolls to geographical coordinates (in degrees, -180..180, -90..90)
	 * @param lon
	 * @param lat
	 */
	void geoScrollTo(double lon, double lat);
	/**
	 * @return current geographical longitude
	 */
	double getLon();
	/**
	 * @return current geographical latitude (in degrees)
	 */
	double getLat();
}
